package com.hb.controller;


import com.hb.pojo.Student;
import com.hb.service.StudentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController
@Api(tags = {"Student模块"}, value = "数据字典控制器")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @Autowired
    DataSource dataSource;

    @ApiOperation("mybatis 测试")
    @GetMapping("/getUser/{id}")
    public Student GetUser(@PathVariable int id) {
        System.out.println(dataSource);
        Student student = studentService.sell(id);
        return student;
    }
}